package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.AlertDataPageQueryDto;
import com.zzyl.entity.AlertData;
import com.zzyl.vo.AlertDataVo;
import com.zzyl.vo.DeviceDataVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface AlertDataMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AlertData record);

    int insertSelective(AlertData record);

    AlertData selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AlertData record);

    int updateByPrimaryKey(AlertData record);

    /**
     * 这是Mybatis Generator拓展插件生成的方法(请勿删除).
     * This method corresponds to the database table alert_data
     *
     * @mbg.generated
     */
    int batchInsert(@Param("list") List<AlertData> list);

    Page<AlertDataVo> selectByPage(AlertDataPageQueryDto dto);


    /**
     * 通过id查询预警数据
     * @param id
     * @return
     */
    @Select("select * from alert_data where id = #{id}")
    AlertData selectById(Long id);

    void update(AlertData alertData);
}